<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标题选项</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
    <script src="../js/jq-1.12.4.js"></script>
    <script src="../js/bootstrap.js"></script>
</head>

<body>
    <div id="app" class="container">
        <h3>nav-tabs(选项卡)</h3>
        <div>
            <ul class="nav nav-tabs">
                <li class="active"><a href="#">首页</a></li>
                <li><a href="#">搜索</a></li>
                <li><a href="#">热点</a></li>
                <li><a href="#">美女</a></li>
                <li><a href="#">军事</a></li>
            </ul>
            <div>
                首页
            </div>
        </div>
    </div>
</body>
<script>
    $(function () {
        $('.nav li').click(function () {
            //修改激活状态
            $(this).siblings().removeClass('active').end().addClass('active')
            //修改显示的内容
            $(this).parent().next().html($(this).html())
        })
    })
</script>

</html>